using System;
using System.Collections.Generic;
using System.Text;
using emp.DALFactory;
using emp.IDAL;
using emp.Model;
using System.Collections;

namespace emp.BLL
{
    public class DDR
    {
        public void Insert(DDRInfo ddrinfo)
        {

            // Get an instance of the account DAL using the DALFactory
            IDDR dal = DALFactory.DDR.Create();

            // Send the udpated account information to the DAL
            dal.Insert(ddrinfo);
        }

        public void Update(DDRInfo ddrinfo)
        {

            // Get an instance of the account DAL using the DALFactory
            IDDR dal = DALFactory.DDR.Create();

            // Send the udpated account information to the DAL
            dal.Update(ddrinfo);
        }

        public void Delete(int ddr_id)
        {

            // Get an instance of the account DAL using the DALFactory
            IDDR dal = DALFactory.DDR.Create();

            // Send the udpated account information to the DAL
            dal.Delete(ddr_id);
        }




        public DDRInfo getDDRInfo(int DDR_ID)
        {
            IDDR dal = DALFactory.DDR.Create();
            return dal.getDDRInfo(DDR_ID);
        }


        public IList getDDRList(int DDR_Source_ID)
        {
            IDDR dal = DALFactory.DDR.Create();
            return dal.getDDRList(DDR_Source_ID);
        }

        public int getSourceID(string sourcetable)
        {
            IDDR dal = DALFactory.DDR.Create();
            return dal.getSourceID(sourcetable); 
        }
    }
}
